<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
  <meta charset="UTF-8">
  <title>JavaScript 字符串搜索 </title>
</head>
<body>
<h2>String.includes()</h2>
<p>如果字符串包含指定值，includes() 方法返回 true。</p>

<p>检查字符串是否包含 "world"：</p>

<p id="demo"></p>

<p>Internet Explorer 不支持 includes() 方法。</p>

<script>
  let text = "Hello world, welcome to the universe.";
  document.getElementById("demo").innerHTML =text.includes("world");
</script>
</body>
</html>


<!--输出结果：true

语法：string.includes(searchvalue, start)
-->